<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html >
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>response对象</title>
</head>
	<%
		request.setCharacterEncoding("UTF-8");
		String str = request.getParameter("submit");
		out.println(str);
		if(str != null ){
			if(str.equals("yes")){
				response.setContentType("application/msword;charset=utf-8");
			}
		}
	%>
<body>
	response对象<p>
	将当前页面保存为word文档
	<form name = "form1">
		<input type = "submit" value = "yes" name = "submit">
	</form>
</body>
</html>